import 'package:card_display/utils/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';


void main() {
  runApp(MyApp());
}


class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {

    return ScreenUtilInit(
        designSize: const Size(750, 1334),
        builder: (context, child) =>
            GetMaterialApp(
              enableLog: true,
              initialRoute: '/main',
              getPages:RouterConfigs.routes,
              defaultTransition: Transition.rightToLeft,
              logWriterCallback: localLogWriter,
              navigatorKey: Get.key,

              // key: ,
            ));
  }


  void localLogWriter(String text, {bool isError = false}) {
    // pass the message to your favourite logging package here
    // please note that even if enableLog: false log messages will be pushed in this callback
    // you get check the flag if you want through GetConfig.isLogEnable
    if (isError) {
      print("错误日志开始+++++++++++++++++++++++++");
      print(text);
      print("错误日志结束+++++++++++++++++++++++++");
    }
  }
}
